/// code : 200
/// msg : "成功"
/// data : {"access_token":"336a2296-c925-4add-b335-f1d02bfbb0e0","token_type":"bearer","refresh_token":"e1e47910-5fe5-4f32-8552-bd0b05978ddb","expires_in":2591999,"scope":"read write","mobile":"18348998068","nickname":"哈哈","license":"made by hopson","user_id":996912435216764928,"authorities":["1"]}
/// success : true

class LoginBean {
  LoginBean({
    int? code,
    String? msg,
    Data? data,
    bool? success,
  }) {
    _code = code;
    _msg = msg;
    _data = data;
    _success = success;
  }

  LoginBean.fromJson(dynamic json) {
    _code = json['code'];
    _msg = json['msg'];
    _data = json['data'] != null ? Data.fromJson(json['data']) : null;
    _success = json['success'];
  }
  int? _code;
  String? _msg;
  Data? _data;
  bool? _success;

  int? get code => _code;
  String? get msg => _msg;
  Data? get data => _data;
  bool? get success => _success;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = _code;
    map['msg'] = _msg;
    if (_data != null) {
      map['data'] = _data?.toJson();
    }
    map['success'] = _success;
    return map;
  }
}

/// access_token : "336a2296-c925-4add-b335-f1d02bfbb0e0"
/// token_type : "bearer"
/// refresh_token : "e1e47910-5fe5-4f32-8552-bd0b05978ddb"
/// expires_in : 2591999
/// scope : "read write"
/// mobile : "18348998068"
/// nickname : "哈哈"
/// license : "made by hopson"
/// user_id : 996912435216764928
/// authorities : ["1"]

class Data {
  Data({
    String? accessToken,
    String? tokenType,
    String? refreshToken,
    int? expiresIn,
    String? scope,
    String? mobile,
    String? nickname,
    String? license,
    String? userId,
    List<String>? authorities,
  }) {
    _accessToken = accessToken;
    _tokenType = tokenType;
    _refreshToken = refreshToken;
    _expiresIn = expiresIn;
    _scope = scope;
    _mobile = mobile;
    _nickname = nickname;
    _license = license;
    _userId = userId;
    _authorities = authorities;
  }

  Data.fromJson(dynamic json) {
    _accessToken = json['access_token'];
    _tokenType = json['token_type'];
    _refreshToken = json['refresh_token'];
    _expiresIn = json['expires_in'];
    _scope = json['scope'];
    _mobile = json['mobile'];
    _nickname = json['nickname'];
    _license = json['license'];
    _userId = json['user_id'];
    _authorities =
        json['authorities'] != null ? json['authorities'].cast<String>() : [];
  }
  String? _accessToken;
  String? _tokenType;
  String? _refreshToken;
  int? _expiresIn;
  String? _scope;
  String? _mobile;
  String? _nickname;
  String? _license;
  String? _userId;
  List<String>? _authorities;

  String? get accessToken => _accessToken;
  String? get tokenType => _tokenType;
  String? get refreshToken => _refreshToken;
  int? get expiresIn => _expiresIn;
  String? get scope => _scope;
  String? get mobile => _mobile;
  String? get nickname => _nickname;
  String? get license => _license;
  String? get userId => _userId;
  List<String>? get authorities => _authorities;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['access_token'] = _accessToken;
    map['token_type'] = _tokenType;
    map['refresh_token'] = _refreshToken;
    map['expires_in'] = _expiresIn;
    map['scope'] = _scope;
    map['mobile'] = _mobile;
    map['nickname'] = _nickname;
    map['license'] = _license;
    map['user_id'] = _userId;
    map['authorities'] = _authorities;
    return map;
  }
}
